﻿using XNode;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using BearUtil.Hidden;
using UnityEngine;
namespace BearUtil
{
	[CreateNodeMenu("前缀节点/点击与赠礼相关对话前置节点"), Title("点击与赠礼相关对话前置节点"), NodeTintAttribute("#1F7118")]
	public class dialogue6 : BearPrefix
	{
		[SerializeField, HideLabel, ValueDropdown("GetActors"), OnValueChanged("setRoleId")]
		public ActorData _actor;
		private ActorData[] GetActors()
		{
			var storyGraph = ((graph as DialogGraph)?.owner.graph as StoryGraph);
			if (storyGraph == null)
				storyGraph = graph as StoryGraph;
			if (storyGraph != null)
			{
				var series = StoriesSetting.Instance.FindSeriesByStoryGraph(storyGraph);
				return series.Actors.ToArray();
			}
			return new ActorData[0];
		}

		[LabelText("居民ID")]

		public int role_id;
		private void setRoleId(ActorData actor)
		{
			role_id = _actor.role_id;
		}
		[HideLabel, ValueDropdown("GetSubTriggerParam", DropdownWidth = 300), OnValueChanged("SetSubTriggerParam")]
		public string _value_subtriggerparam = "【选择子触发事件】";
		[LabelText("触发参数"), HideInInspector]
		public int sub_trigger_param = 0;
		public void SetSubTriggerParam (string propDesc) => sub_trigger_param = CreateNewProperty.Instance.GetPropertyContent("SubTriggerParam", _value_subtriggerparam).IntParam;
		public List<string> GetSubTriggerParam () 
{ return CreateNewProperty.Instance.GetPropertyContentDesc("SubTriggerParam"); }
		[LabelText("当前天数")]
		public int day = 0;
		[LabelText("接取后阶段开始")]
		public int quest_id = 0;
		[LabelText("完成后阶段结束")]
		public int quest_id_end = 0;
		[HideLabel, ValueDropdown("GetLikeLevel", DropdownWidth = 300), OnValueChanged("SetLikeLevel")]
		public string _value_likelevel = "【配置收礼的等级】";
		[LabelText("喜欢等级"), HideInInspector]
		public int like_level = 0;
		public void SetLikeLevel (string propDesc) => like_level = CreateNewProperty.Instance.GetPropertyContent("LikeLevel", _value_likelevel).IntParam;
		public List<string> GetLikeLevel () 
{ return CreateNewProperty.Instance.GetPropertyContentDesc("LikeLevel"); }
		[HideLabel, ValueDropdown("GetGiftBackLevel", DropdownWidth = 300), OnValueChanged("SetGiftBackLevel")]
		public string _value_giftbacklevel = "【配置回礼的等级】";
		[LabelText("回礼等级"), HideInInspector]
		public int gift_back_level = 0;
		public void SetGiftBackLevel (string propDesc) => gift_back_level = CreateNewProperty.Instance.GetPropertyContent("GiftBackLevel", _value_giftbacklevel).IntParam;
		public List<string> GetGiftBackLevel () 
{ return CreateNewProperty.Instance.GetPropertyContentDesc("GiftBackLevel"); }
		[LabelText("镜头聚焦于角色")]
		public bool camera_focus_on_role = true;
		[LabelText("【固定值别改】")]
		public int trigger_event = 6;
		[LabelText("备注")]
		public string remark = "";
	}
}
